<div class="layui-card">
    <div class="layui-card-body">
        <div>
            <form action=""  class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <input type="text" name="keywords" value="{$search.keywords}" class="layui-input" placeholder="昵称">
                    </div>
                    <div class="layui-input-inline">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
                    </div>
                </div>
            </form>

            <form action="{:url('admin/user.admin_oauth/deluser')}" method="post" class="layui-form delete-form" id="cp-form">
                <div class="layui-btn-group">
                    <!--<a href="{:url('admin/user.admin_oauth/adduser')}" class="layui-btn layui-btn-xs">
                        <i class="layui-icon layui-icon-addition"></i>
                        创建用户
                    </a>-->
                    <button type="submit" class="layui-btn layui-btn-xs layui-btn-danger ">
                        <i class="layui-icon">&#xe640;</i>
                        删除用户
                    </button>
                    <a href="{:url('admin/user.admin_oauth/excel')}" class="layui-btn layui-btn-xs">
                        导出Excel
                    </a>
                    <span class="layui-badge-rim layui-btn layui-btn-xs">用户人数：{$userList->total()}</span>

                </div>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th width="10">
                            <input type="checkbox" class="layui-input"  lay-skin="primary" lay-filter="select-all">
                        </th>
                        <th width="120">来源</th>
                        <th>头像</th>
                        <th>绑定账号</th>
                        <th>绑定手机</th>
                        <th>创建时间</th>
                        <th>登陆时间</th>
                        <th>登陆次数</th>
                        <th>最后登陆ip</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="userList" id='v'}
                    <tr>
                        <td align="center" valign="middle">
                            <input type="checkbox" name="idList[]" class="layui-input" lay-skin="primary" value="{$v.id}">
                        </td>
                        <td>{$v.third_party}</td>
                        <?php
                            $avatar = _get_image_preview_url($v['avatar']);
                            $telphone = $v['phone'];
                            if(!$avatar){
                                $avatar = isset($v['more']['avatar'])?$v['more']['avatar']:'';
                            }
                            if(!$telphone){
                                $telphone = isset($v['more']['telphone'])?$v['more']['telphone']:'';
                            }
                        ?>
                        <td><img width="25" height="25" src="{$avatar}"/></td>
                        <td>{$v.username|default=''}</td>
                        <td>{$telphone}</td>
                        <td>{$v['create_time']}</td>
                        <td>{:date('Y-m-d H:i:s',$v['last_login_time'])}</td>
                        <td>{$v.login_times}</td>
                        <td>{$v.last_login_ip}</td>
                        <td></td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </form>
            {$userList|raw}
        </div>
    </div>
</div>